package com.firewolf.log.core;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 作者：刘兴
 * 时间:19/2/20
 **/
@Configuration
@EnableConfigurationProperties(LogProperties.class)
public class LogConfig {

    @Bean
    @ConditionalOnMissingBean(value = LogService.class)
    public LogService logService() {
        return new DefaultLogService();
    }

    @Bean
    @ConditionalOnMissingBean(UserInfoService.class)
    public UserInfoService userInfoService() {
        return new DefaultUserInfoService();
    }
}
